export const addCustomBlocks = (editor) => {
  // Block 可以理解为是一个或多个 Component 组成的“代码片段”
  // add即为添加一个block，my-block-id中包含了span和div两个component
  editor.BlockManager.add('my-block-id', {
    label: '块',
    category:'基础类',
    media:`<svg t="1720767982631" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="13997" width="30" height="30"><path d="M512 69.717333l383.018667 221.141334v442.282666L512 954.282667 128.981333 733.141333V290.858667L512 69.717333zM192.96 375.402667v320.768L480 861.888V541.141333l-287.04-165.76z m638.058667 0L544 541.162667V861.866667l287.018667-165.717334V375.424zM512 143.637333L215.722667 314.666667 512 485.717333l296.256-171.050666L512 143.616z" p-id="13998"></path></svg>`,
    content: {
      tagName: 'div',
      draggable: true,
      attributes: { 'some-attribute': 'some-value' },
      components: [
        {
          tagName: 'span',
          content: '<b>动态添加block</b>',
        },
        {
          tagName: 'div',
          components: '<span>block的内容</span>',
        },
      ],
    },
  });

  // editor.BlockManager.add('image1', {
  //   // 点击图像块后打开资源管理器
  //   activate: true,
  //   label: '图片',
  //   content: {
  //     type: 'image',
  //     style: { color: 'black' },
  //   },
  // });
};
